package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimeMaincheckharmoccupationaldiseaeMapper;
import com.dime.physical.domain.DimeMaincheckharmoccupationaldiseae;
import com.dime.physical.service.IDimeMaincheckharmoccupationaldiseaeService;

/**
 * 危害对应的职业病Service业务层处理
 * 
 * @author Tiny
 * @date 2023-10-17
 */
@Service
public class DimeMaincheckharmoccupationaldiseaeServiceImpl implements IDimeMaincheckharmoccupationaldiseaeService 
{
    @Autowired
    private DimeMaincheckharmoccupationaldiseaeMapper dimeMaincheckharmoccupationaldiseaeMapper;

    /**
     * 查询危害对应的职业病
     * 
     * @param id 危害对应的职业病主键
     * @return 危害对应的职业病
     */
    @Override
    public DimeMaincheckharmoccupationaldiseae selectDimeMaincheckharmoccupationaldiseaeById(String id)
    {
        return dimeMaincheckharmoccupationaldiseaeMapper.selectDimeMaincheckharmoccupationaldiseaeById(id);
    }

    /**
     * 查询危害对应的职业病列表
     * 
     * @param dimeMaincheckharmoccupationaldiseae 危害对应的职业病
     * @return 危害对应的职业病
     */
    @Override
    public List<DimeMaincheckharmoccupationaldiseae> selectDimeMaincheckharmoccupationaldiseaeList(DimeMaincheckharmoccupationaldiseae dimeMaincheckharmoccupationaldiseae)
    {
        return dimeMaincheckharmoccupationaldiseaeMapper.selectDimeMaincheckharmoccupationaldiseaeList(dimeMaincheckharmoccupationaldiseae);
    }

    /**
     * 新增危害对应的职业病
     * 
     * @param dimeMaincheckharmoccupationaldiseae 危害对应的职业病
     * @return 结果
     */
    @Override
    public int insertDimeMaincheckharmoccupationaldiseae(DimeMaincheckharmoccupationaldiseae dimeMaincheckharmoccupationaldiseae)
    {
        dimeMaincheckharmoccupationaldiseae.setCreateTime(DateUtils.getNowDate());
        return dimeMaincheckharmoccupationaldiseaeMapper.insertDimeMaincheckharmoccupationaldiseae(dimeMaincheckharmoccupationaldiseae);
    }

    /**
     * 修改危害对应的职业病
     * 
     * @param dimeMaincheckharmoccupationaldiseae 危害对应的职业病
     * @return 结果
     */
    @Override
    public int updateDimeMaincheckharmoccupationaldiseae(DimeMaincheckharmoccupationaldiseae dimeMaincheckharmoccupationaldiseae)
    {
        dimeMaincheckharmoccupationaldiseae.setUpdateTime(DateUtils.getNowDate());
        return dimeMaincheckharmoccupationaldiseaeMapper.updateDimeMaincheckharmoccupationaldiseae(dimeMaincheckharmoccupationaldiseae);
    }

    /**
     * 批量删除危害对应的职业病
     * 
     * @param ids 需要删除的危害对应的职业病主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckharmoccupationaldiseaeByIds(String[] ids)
    {
        return dimeMaincheckharmoccupationaldiseaeMapper.deleteDimeMaincheckharmoccupationaldiseaeByIds(ids);
    }

    /**
     * 删除危害对应的职业病信息
     * 
     * @param id 危害对应的职业病主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckharmoccupationaldiseaeById(String id)
    {
        return dimeMaincheckharmoccupationaldiseaeMapper.deleteDimeMaincheckharmoccupationaldiseaeById(id);
    }
}
